import request from '@/utils/request'

// 查询流程表单列表
export function listForm(query) {
  return request({
    url: "/system/workflow/form/list",
    method: "get",
    params: query,
  });
}

// 查询流程表单详细
export function getForm(formId) {
  return request({
    url: "/system/workflow/form/" + formId,
    method: "get",
  });
}

// 新增流程表单
export function addForm(data) {
  return request({
    url: "/system/workflow/form",
    method: "post",
    data: data,
  });
}

// 修改流程表单
export function updateForm(data) {
  return request({
    url: "/system/workflow/form",
    method: "put",
    data: data,
  });
}
// 挂载表单
export function addDeployForm(data) {
  return request({
    url: "/system/workflow/form/addDeployForm",
    method: "post",
    data: data,
  });
}

// 删除流程表单
export function delForm(formId) {
  return request({
    url: "/system/workflow/form/" + formId,
    method: "delete",
  });
}

// 查询字段映射列表
export function listFields() {
  return request({
    url: "/system/workflow/form/fieldList",
    method: "get",
  });
}